Skip to content

Rollup of 11 pull requests#154503

Merged
rust-bors[bot] merged 27 commits intorust-lang:mainfrom
RalfJung:rollup-DkU2JXL
Mar 28, 2026
Merged

Rollup of 11 pull requests#154503
rust-bors[bot] merged 27 commits intorust-lang:mainfrom
RalfJung:rollup-DkU2JXL

Conversation

@RalfJung
Copy link
Copy Markdown
Member

Successful merges:

r? @ghost

Create a similar rollup

homersimpsons and others added 27 commits March 7, 2026 09:50
It has a single call site. And also remove all the `debug!` calls that
clutter up the code. The end result is much easier to read, with
`try_mark_previous_green` now recursively calling itself directly,
instead of indirectly via `try_mark_parent_green`.
This code is only needed by an obscure `-Z` flag, so pulling it out of the main
path makes the normal logic easier to follow.
…alueFormat-i686, r=marcoieni

Fix LegacyKeyValueFormat report from docker build: i686

Part of rust-lang#152305

r? @marcoieni
interpreter error reporting: remove arguments that are always the same

This `report` function is called twice and both callers use the same `span` and `get_span_and_frames`... so let's just fix those arguments inside the function, no need to be more generic than this.
Replace `truncate(0)` with `clear()`
…en, r=oli-obk

Inline and remove `DepGraphData::try_mark_parent_green`.

It has a single call site. And also remove all the `debug!` calls that clutter up the code. The end result is much easier to read, with `try_mark_previous_green` now recursively calling itself directly, instead of indirectly via `try_mark_parent_green`.

r? @oli-obk
…=joboet

Prevent no_threads RwLock's write() impl from setting mode to -1 when it is locked for reading

In my time updating the docs to `std::sync::RwLock` and adding a test verifying that max reader count is reachable in rust-lang#153555, I noticed that the no_threads RwLock's `write()` implementation always sets the `mode` to `-1` (denoting writer locked) even though it could be reader locked. I feel like that's logically incorrect and that it should only be setting the `mode` to `-1` when we know that the mode is unlocked (`0`); `write()` should mirror the code that `read()` and `try_read()` has with `try_write()`.

For reference on read/try_read and write/try_write current implementations:
```rust
    #[inline]
    pub fn read(&self) {
        let m = self.mode.get();
        if m >= 0 {
            self.mode.set(m + 1);
        } else {
            rtabort!("rwlock locked for writing");
        }
    }

    #[inline]
    pub fn try_read(&self) -> bool {
        let m = self.mode.get();
        if m >= 0 {
            self.mode.set(m + 1);
            true
        } else {
            false
        }
    }

    #[inline]
    pub fn write(&self) {
        if self.mode.replace(-1) != 0 { // <-- This behavior logically does something different than what `try_write` does
            rtabort!("rwlock locked for reading")
        }
    }

    #[inline]
    pub fn try_write(&self) -> bool {
        if self.mode.get() == 0 {
            self.mode.set(-1);
            true
        } else {
            false
        }
    }
```

r? @jhpratt
…me-secret-of-success-in-testing-normalize, r=fmease

Normalize rustc path prefix when testing `-Z track-diagnostics`

Fixes rust-lang#154392
Use the normal arg-parsing machinery for `-Zassert-incr-state`

The flag parser for `-Zassert-incr-state` currently extracts an `Option<String>`, and then performs an ad-hoc parsing step slightly later. From looking at rust-lang#90386, I can't see any reason why it doesn't just use the normal flag-parsing machinery.

A second commit also extracts the underlying implementation to a separate helper function, so that it isn't cluttering up the main control flow.

I found this while working on larger cleanups to incremental-file loading.
…pat, r=Kivooeo

Emit a pre-expansion feature gate warning for `box`'ed struct field patterns

While the following code triggers a feature gate *warning*:

```rs
fn f() {
    #[cfg(false)]
    let box x; //~ WARN box pattern syntax is experimental
}
```

the code below does not (on stable & main):

```rs
fn f() {
    #[cfg(false)]
    let Struct { box x };
}
```

This is an oversight as both are part of the unstable feature `box_patterns` (that isn't properly gated pre expansion for historical reasons). Of course, both forms lead to a feature gate error *post expansion*.

This is a bug fix and doesn't need any input from T-compiler or T-lang. For context, emitting warnings in these cases is legitimized by [MCP 535](https://github.com/rust-lang/compiler-team/issues/535)[^1].

Part of rust-lang#154045.

[^1]: In case you're wondering why the MCP talks about a *lint* even though the feature gate warnings as seen today don't reference any lint by name, read rust-lang#154045 (comment).
…-obk

EnumSizeOpt: use Allocation::write_scalar instead of manual endianess logic

The first commits makes the test actually show the bytes of the newly generated allocation, so we'd notice if something goes wrong.

The 2nd commit replaces manual endianess handling with use of proper `Allocation` methods.

r? @oli-obk
…r=oli-obk

interpret: ensure that untupled arguments are actually tuples

Something seems very wrong if they are not. ;)
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 28, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner labels Mar 28, 2026
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Mar 28, 2026
@RalfJung
Copy link
Copy Markdown
Member Author

@bors r+ p=5

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 28, 2026

📌 Commit c47e0e1 has been approved by RalfJung

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 28, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 28, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 28, 2026

☀️ Test successful - CI
Approved by: RalfJung
Duration: 3h 4m 2s
Pushing 0d4eb09 to main...

@rust-bors rust-bors bot merged commit 0d4eb09 into rust-lang:main Mar 28, 2026
12 checks passed
@rustbot rustbot added this to the 1.96.0 milestone Mar 28, 2026
@RalfJung RalfJung deleted the rollup-DkU2JXL branch March 28, 2026 17:01
@rust-timer
Copy link
Copy Markdown
Collaborator

📌 Perf builds for each rolled up PR:

PR# Message Perf Build Sha
#152880 Tweak incorrect assoc item note f94f613c3a10d05999140c194a6c8006c3809fc9 (link)
#153526 Fix LegacyKeyValueFormat report from docker build: i686 f4f4e0aa3c2fc9aa522dd709b9cdf77030603075 (link)
#153613 interpreter error reporting: remove arguments that are alwa… 1f3d4ae37256cfd2002fa1786e49ddcb6601c768 (link)
#154029 Replace truncate(0) with clear() 8ae848cbc805631ee17f3b1d4670d03cf7dc2fdb (link)
#154125 Inline and remove DepGraphData::try_mark_parent_green. 328b229c75058308a1c75a00462cb887bf1e9e91 (link)
#154185 Prevent no_threads RwLock's write() impl from setting mode … 38d0f6eddc4ab33a6161d1e14a6c45b183dd386a (link)
#154394 Normalize rustc path prefix when testing `-Z track-diagnost… 27a1b88899fb675a800c87f29f51e05c6e23fead (link)
#154450 Use the normal arg-parsing machinery for `-Zassert-incr-sta… 7dd63dbe5a0e0670ab075c9d5398c041f248cbd7 (link)
#154475 Emit a pre-expansion feature gate warning for box'ed stru… cad1a7c73946df771ca18f20fec59320e69f27b0 (link)
#154500 EnumSizeOpt: use Allocation::write_scalar instead of manual… 3af5fda186f4642adcdcfe26599c8b8c8ef995d8 (link)
#154502 interpret: ensure that untupled arguments are actually tupl… a7c1a38dc7d2a6af23a8c77774f6989bec308311 (link)

previous master: 7e28c7438a

In the case of a perf regression, run the following command for each PR you suspect might be the cause: @rust-timer build $SHA

@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
   Compiling glob-match v0.2.1
   Compiling diff v0.1.13
   Compiling citool v0.1.0 (/home/runner/work/rust/rust/src/ci/citool)
    Finished `release` profile [optimized] target(s) in 41.45s
     Running `target/release/citool post-merge-report 7e28c7438a7b0c79a09724ba799d32ed461beb72 0d4eb09831046687ccd28e8a570735e90f22004c`
Downloading metrics of job aarch64-gnu
Downloading metrics of job aarch64-gnu-debug
Downloading metrics of job arm-android
Downloading metrics of job armhf-gnu
Downloading metrics of job dist-aarch64-linux
Downloading metrics of job dist-android
Downloading metrics of job dist-arm-linux-gnueabi
Downloading metrics of job dist-arm-linux-musl
Downloading metrics of job dist-armhf-linux
Downloading metrics of job dist-armv7-linux
Downloading metrics of job dist-i586-gnu-i586-i686-musl
Downloading metrics of job dist-i686-linux
Downloading metrics of job dist-loongarch64-linux
Downloading metrics of job dist-loongarch64-musl
Downloading metrics of job dist-ohos-aarch64
Downloading metrics of job dist-ohos-armv7
Downloading metrics of job dist-ohos-x86_64
Downloading metrics of job dist-powerpc-linux
Downloading metrics of job dist-powerpc64-linux-gnu
Downloading metrics of job dist-powerpc64-linux-musl
Downloading metrics of job dist-powerpc64le-linux-gnu
Downloading metrics of job dist-powerpc64le-linux-musl
Downloading metrics of job dist-riscv64-linux
Downloading metrics of job dist-s390x-linux
Downloading metrics of job dist-various-1
Downloading metrics of job dist-various-2
Downloading metrics of job dist-x86_64-freebsd
Downloading metrics of job dist-x86_64-illumos
Downloading metrics of job dist-x86_64-linux
Downloading metrics of job dist-x86_64-linux-alt
Downloading metrics of job dist-x86_64-musl
Did not find metrics for job `dist-x86_64-musl` at `7e28c7438a7b0c79a09724ba799d32ed461beb72`: http status: 502.
Maybe it was newly added?
Downloading metrics of job dist-x86_64-netbsd
Downloading metrics of job dist-x86_64-solaris
Downloading metrics of job dist-sparcv9-solaris
Downloading metrics of job i686-gnu-1
Downloading metrics of job i686-gnu-2
Downloading metrics of job i686-gnu-nopt-1
Downloading metrics of job i686-gnu-nopt-2
Downloading metrics of job pr-check-1
Downloading metrics of job pr-check-2
Downloading metrics of job tidy
Downloading metrics of job test-various
Downloading metrics of job x86_64-rust-for-linux
Downloading metrics of job x86_64-gnu
Downloading metrics of job optional-x86_64-gnu-parallel-frontend
Downloading metrics of job x86_64-gnu-gcc
Downloading metrics of job x86_64-gnu-stable
Downloading metrics of job x86_64-gnu-aux
Downloading metrics of job x86_64-gnu-debug
Downloading metrics of job x86_64-gnu-distcheck
Downloading metrics of job x86_64-gnu-llvm-21-1
Downloading metrics of job x86_64-gnu-llvm-21-2
Downloading metrics of job x86_64-gnu-llvm-21-3
Downloading metrics of job x86_64-gnu-llvm-22-1
Downloading metrics of job x86_64-gnu-llvm-22-2
Downloading metrics of job x86_64-gnu-llvm-22-3
Downloading metrics of job x86_64-gnu-nopt
Downloading metrics of job x86_64-gnu-tools
Downloading metrics of job x86_64-gnu-miri
Downloading metrics of job dist-x86_64-apple
Downloading metrics of job dist-apple-various
Downloading metrics of job dist-aarch64-apple
Downloading metrics of job aarch64-apple
Downloading metrics of job x86_64-msvc-1
Downloading metrics of job x86_64-msvc-2
Downloading metrics of job i686-msvc-1
Downloading metrics of job i686-msvc-2
Downloading metrics of job aarch64-msvc-1
Downloading metrics of job aarch64-msvc-2
Downloading metrics of job x86_64-msvc-ext1
Downloading metrics of job x86_64-msvc-ext2
Downloading metrics of job x86_64-msvc-ext3
Downloading metrics of job x86_64-mingw-1
Downloading metrics of job x86_64-mingw-2
Downloading metrics of job dist-x86_64-msvc
Downloading metrics of job dist-i686-msvc
Downloading metrics of job dist-aarch64-msvc
Downloading metrics of job dist-i686-mingw
Downloading metrics of job dist-x86_64-mingw
Downloading metrics of job dist-aarch64-llvm-mingw
Downloading metrics of job dist-x86_64-llvm-mingw
Downloading metrics of job dist-x86_64-msvc-alt
Did not find metrics for job `dist-x86_64-msvc-alt` at `7e28c7438a7b0c79a09724ba799d32ed461beb72`: http status: 503.
Maybe it was newly added?
Downloading metrics of job x86_64-gnu-llvm-21
Error: http status: 502
##[error]Process completed with exit code 1.
Post job cleanup.

@RalfJung
Copy link
Copy Markdown
Member Author

@rust-lang/infra uh, something failed post-merge...?

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (0d4eb09): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary 2.2%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
2.2% [2.1%, 2.2%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.2% [2.1%, 2.2%] 2

Cycles

Results (primary 4.0%, secondary 2.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
4.0% [4.0%, 4.0%] 1
Regressions ❌
(secondary)
3.3% [1.9%, 6.6%] 9
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.4% [-2.7%, -2.2%] 2
All ❌✅ (primary) 4.0% [4.0%, 4.0%] 1

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 484.417s -> 485.141s (0.15%)
Artifact size: 394.97 MiB -> 394.93 MiB (-0.01%)

@Kobzol
Copy link
Copy Markdown
Member

Kobzol commented Mar 28, 2026

Transient GitHub error when analysing logs, no big deal, but thanks for letting me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-compiletest Area: The compiletest test runner A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. rollup A PR which is a rollup T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.